from django.contrib import admin

from .models import Category, Tag, Article, Comment


class ArticleAdmin(admin.ModelAdmin):
    list_display = ['title', 'author', 'excerpt', 'views', 'category', 'created_time']
    search_fields = ['title', 'content', 'category__name']


admin.site.register(Article, ArticleAdmin)
admin.site.register([Category, Tag, Comment])
